package com.maomao.permission.config.shiro;

import org.apache.shiro.authc.AuthenticationToken;

import com.maomao.permission.model.UserInfo;

public class OAuth2Token implements AuthenticationToken {
	
	
	private static final long serialVersionUID = -4642201054295502219L;
	private String authCode;
	private UserInfo principal;
	
	public OAuth2Token(String authCode){
		this.authCode = authCode;
	}

	
	public String getAuthCode() {
		return authCode;
	}


	public void setAuthCode(String authCode) {
		this.authCode = authCode;
	}


	public void setPrincipal(UserInfo principal) {
		this.principal = principal;
	}


	@Override
	public Object getPrincipal() {
		
		return this.principal;
	}

	@Override
	public Object getCredentials() {
		
		return this.authCode;
	}

}
